package com.bnlr.lrparking.appui.publish;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.bnlr.lrparking.R;
import com.bnlr.lrparking.base.BaseActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * 点击去发布
 */
public class GoPublishActivity extends BaseActivity {
    private Unbinder unbinder;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_go_publish);
        unbinder = ButterKnife.bind(this);
    }
    @OnClick({R.id.my_publish,R.id.ll_cz,R.id.ll_cs,R.id.ll_qz,R.id.ll_qg})
    public void publishOnClick (View view) {
        switch (view.getId()) {
            case R.id.my_publish:
                finish();
                break;
            case R.id.ll_cz:
                startActivity(new Intent(this, PublishActivity.class).putExtra("publish_tag",1));
                break;
            case R.id.ll_cs:
                startActivity(new Intent(this, ChoseIdentityActivity.class)
                        .putExtra("from",2));
                break;
            case R.id.ll_qz:
                startActivity(3);
                break;
            case R.id.ll_qg:
                startActivity(4);
                break;
            default:
                break;
        }
    }
    /**
     *
     * @param tag 1= 出租 2=出售 3=求租 4=求购
     */
    public void startActivity (int tag) {
        startActivity(new Intent(this, PublishBegActivity.class)
                .putExtra("publish_tag",tag));
    }
    @Override
    public void onDestroy() {
        super.onDestroy();
        unbinder.unbind();
    }
}
